PoD: appropriate BUG_ON when domain is dying
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 11 Dec 2009 08:42:28 +0000 (08:42 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 11 Dec 2009 08:42:28 +0000 (08:42 +0000)
commitef9550e2e2f3d682155f9c236c94c254f3369686
tree461c11eba3f5bdd42e6d316573c3fbd3648e05c4
parentb6d4a6d487c1aed0d53ffa3b969f82a5d0b50201
PoD: appropriate BUG_ON when domain is dying

BUG_ON(d->is_dying) in p2m_pod_cache_add() which is introduced in
c/s 20426 is not proper. Since dom->is_dying is set asynchronously.
For example, MMU_UPDATE hypercalls from qemu and the
DOMCTL_destroydomain hypercall from xend can be issued simultaneously.

Also this patch lets p2m_pod_empty_cache() wait by spin_barrier
until another PoD operation ceases.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/arch/x86/mm/p2m.c